Diff for /libaitmqtt/src/aitmqtt.c between versions 1.3.4.1 and 1.3.4.3

version 1.3.4.1, 2022/09/13 20:12:15 version 1.3.4.3, 2022/09/13 22:20:59
Line 12  terms: Line 12  terms:
 All of the documentation and software included in the ELWIX and AITNET  All of the documentation and software included in the ELWIX and AITNET
 Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org>  Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org>
   
Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013Copyright 2004 - 2022
         by Michael Pounov <misho@elwix.org>.  All rights reserved.          by Michael Pounov <misho@elwix.org>.  All rights reserved.
   
 Redistribution and use in source and binary forms, with or without  Redistribution and use in source and binary forms, with or without
Line 107  _mqtt_readHEADER(mqtt_msg_t * __restrict buf, u_char c Line 107  _mqtt_readHEADER(mqtt_msg_t * __restrict buf, u_char c
  * mqtt_msgFree() Free MQTT message   * mqtt_msgFree() Free MQTT message
  *   *
  * @msg = Message buffer   * @msg = Message buffer
 * @all = !=0 Destroy entire message, if MQTT Message allocated with mqtt_msgAlloc() * @keepmsg = !=0 just free message content
  * return: none   * return: none
  */   */
 void  void
mqtt_msgFree(mqtt_msg_t ** __restrict msg, int all)mqtt_msgFree(mqtt_msg_t ** __restrict msg, int keepmsg)
 {  {
         if (msg && *msg) {          if (msg && *msg) {
                 if ((*msg)->msg_base) {                  if ((*msg)->msg_base) {
                         free((*msg)->msg_base);                          free((*msg)->msg_base);
                         (*msg)->msg_base = NULL;                          (*msg)->msg_base = NULL;
                 }                  }
                if (all) {                if (!keepmsg) {
                         free(*msg);                          free(*msg);
                         *msg = NULL;                          *msg = NULL;
                 } else                  } else
Line 422  mqtt_subAlloc(u_short num) Line 422  mqtt_subAlloc(u_short num)
 mqtt_subscr_t *  mqtt_subscr_t *
 mqtt_subRealloc(mqtt_subscr_t ** __restrict subs, u_short num)  mqtt_subRealloc(mqtt_subscr_t ** __restrict subs, u_short num)
 {  {
        mqtt_subscr_t **ss, *s = NULL;        mqtt_subscr_t *ss, *s = NULL;
         register int i;          register int i;
   
         if (!subs)          if (!subs)
                 return NULL;                  return NULL;
   
        for (i = 0, ss = subs; *ss; i++, ss++);        for (i = 0, ss = *subs; ss; i++, ss++);
         if (i < num)          if (i < num)
                 return NULL;                  return NULL;
         if (i == num)          if (i == num)

Removed from v.1.3.4.1  
changed lines
  Added in v.1.3.4.3


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