[Git][NTPsec/ntpsec][master] 2 commits: Drop "used"(use count) from recvbuff

Hal Murray (@hal.murray) gitlab at mg.gitlab.com
Thu Apr 13 20:16:15 UTC 2023



Hal Murray pushed to branch master at NTPsec / ntpsec


Commits:
9e71da02 by Hal Murray at 2023-04-13T01:53:10-07:00
Drop "used"(use count) from recvbuff

It wasn't used.

- - - - -
8e4fc8c6 by Hal Murray at 2023-04-13T13:11:54-07:00
Patch gitlab-ci.yml to save build/config.log

This is a hack to try to debug adding OpenSSL version
printout on macos

- - - - -


3 changed files:

- .gitlab-ci.yml
- include/recvbuff.h
- ntpd/ntp_recvbuff.c


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -399,7 +399,7 @@ macos-refclocks:
   <<: *job_definition
   image: macos-12-xcode-14
   script:
-    - PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig python ./waf configure --disable-doc --disable-manpage --refclock=all build
+    - PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig python ./waf configure --disable-doc --disable-manpage --refclock=all build || cat build/config.log
   tags:
     - shared-macos-amd64
   rules:


=====================================
include/recvbuff.h
=====================================
@@ -42,7 +42,6 @@ struct recvbuf {
 	size_t		recv_length;	/* number of octets received */
 	uint8_t		recv_buffer[RX_BUFF_SIZE];
 	struct parsed_pkt pkt;  /* host-order copy of data from wire */
-	int used;		/* reference count */
 	bool keyid_present;
 	keyid_t keyid;
 	int mac_len;


=====================================
ntpd/ntp_recvbuff.c
=====================================
@@ -121,7 +121,6 @@ get_free_recv_buffer(void)
         if (buffer != NULL) {
                 free_recvbufs--;
                 initialise_buffer(buffer);
-                buffer->used++;
         } else {
                 buffer_shortfall++;
         }
@@ -140,9 +139,6 @@ freerecvbuf(recvbuf_t *rb)
 		return;
 	}
 
-	rb->used--;
-	if (rb->used != 0)
-		msyslog(LOG_ERR, "ERR: ******** freerecvbuff non-zero usage: %d *******", rb->used);
 	LINK_SLIST(free_recv_list, rb, link);
 	free_recvbufs++;
 }



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/compare/98e316aa2e72d41ad450ebc33d59710fb1894e63...8e4fc8c6527a98349438ccbf45c1ba7d1f0e4980

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/compare/98e316aa2e72d41ad450ebc33d59710fb1894e63...8e4fc8c6527a98349438ccbf45c1ba7d1f0e4980
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20230413/02748a23/attachment-0001.htm>


More information about the vc mailing list