Annotation of mqtt/src/aitmqtt.c, revision 1.1.1.1

1.1       misho       1: #include "global.h"
                      2: 
                      3: 
                      4: static int mqtt_Errno;
                      5: static char mqtt_Error[STRSIZ];
                      6: 
                      7: 
                      8: //
                      9: // Error maintenance functions ...
                     10: //
                     11: 
                     12: // mqtt_GetErrno() Get error code of last operation
                     13: inline int
                     14: mqtt_GetErrno()
                     15: {
                     16:        return mqtt_Errno;
                     17: }
                     18: 
                     19: // mqtt_GetError() Get error text of last operation
                     20: inline const char *
                     21: mqtt_GetError()
                     22: {
                     23:        return mqtt_Error;
                     24: }
                     25: 
                     26: // mqtt_SetErr() Set error to variables for internal use!!!
                     27: inline void
                     28: mqtt_SetErr(int eno, char *estr, ...)
                     29: {
                     30:        va_list lst;
                     31: 
                     32:        mqtt_Errno = eno;
                     33:        memset(mqtt_Error, 0, sizeof mqtt_Error);
                     34:        va_start(lst, estr);
                     35:        vsnprintf(mqtt_Error, sizeof mqtt_Error, estr, lst);
                     36:        va_end(lst);
                     37: }
                     38: 
                     39: // ----------------------------------------------------------
                     40: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>