Skip to content

Commit

Permalink
Drop unused nng_msg_getopt
Browse files Browse the repository at this point in the history
  • Loading branch information
gdamore committed Oct 6, 2024
1 parent fee07c1 commit ce0f3f9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
4 changes: 0 additions & 4 deletions include/nng/nng.h
Original file line number Diff line number Diff line change
Expand Up @@ -1300,10 +1300,6 @@ NNG_DECL int nng_udp_multicast_membership(
// These are legacy APIs that have been deprecated.
// Their use is strongly discouraged.

// nng_msg_getopt is defunct, and should not be used by programs. It
// always returns NNG_ENOTSUP.
NNG_DECL int nng_msg_getopt(nng_msg *, int, void *, size_t *) NNG_DEPRECATED;

// Socket options. Use nng_socket_get and nng_socket_set instead.
NNG_DECL int nng_getopt(
nng_socket, const char *, void *, size_t *) NNG_DEPRECATED;
Expand Down
13 changes: 0 additions & 13 deletions src/nng_legacy.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,6 @@
// Eventually they will likely be removed. For now we have
// to continue to provide them for compatibility.

// This function is not supported, but we keep it around to
// satisfy link dependencies in old programs. It has never done
// anything useful.
int
nng_msg_getopt(nng_msg *msg, int opt, void *ptr, size_t *szp)
{
NNI_ARG_UNUSED(msg);
NNI_ARG_UNUSED(opt);
NNI_ARG_UNUSED(ptr);
NNI_ARG_UNUSED(szp);
return (NNG_ENOTSUP);
}

int
nng_getopt(nng_socket id, const char *n, void *v, size_t *sz)
{
Expand Down

0 comments on commit ce0f3f9

Please sign in to comment.