| 2577 | */ |
| 2578 | |
| 2579 | int /* O - Major version number or 0 on error */ |
| 2580 | ippGetVersion(ipp_t *ipp, /* I - IPP message */ |
| 2581 | int *minor) /* O - Minor version number or @code NULL@ for don't care */ |
| 2582 | { |
| 2583 | /* |
| 2584 | * Range check input... |
| 2585 | */ |
| 2586 | |
| 2587 | if (!ipp) |
| 2588 | { |
| 2589 | if (minor) |
| 2590 | *minor = 0; |
| 2591 | |
| 2592 | return (0); |
| 2593 | } |
| 2594 | |
| 2595 | /* |
| 2596 | * Return the value... |
| 2597 | */ |
| 2598 | |
| 2599 | if (minor) |
| 2600 | *minor = ipp->request.any.version[1]; |
| 2601 | |
| 2602 | return (ipp->request.any.version[0]); |
| 2603 | } |
| 2604 | |
| 2605 | |
| 2606 | /* |
no outgoing calls