summaryrefslogtreecommitdiff
path: root/sys/contrib/ngatm/netnatm/api
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/ngatm/netnatm/api')
-rw-r--r--sys/contrib/ngatm/netnatm/api/cc_conn.c4
-rw-r--r--sys/contrib/ngatm/netnatm/api/cc_dump.c24
-rw-r--r--sys/contrib/ngatm/netnatm/api/cc_user.c7
3 files changed, 18 insertions, 17 deletions
diff --git a/sys/contrib/ngatm/netnatm/api/cc_conn.c b/sys/contrib/ngatm/netnatm/api/cc_conn.c
index c67716fe650de..a8e1b3832cb77 100644
--- a/sys/contrib/ngatm/netnatm/api/cc_conn.c
+++ b/sys/contrib/ngatm/netnatm/api/cc_conn.c
@@ -31,7 +31,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Begemot: libunimsg/netnatm/api/cc_conn.c,v 1.1 2004/07/08 08:21:49 brandt Exp $
+ * $Begemot: libunimsg/netnatm/api/cc_conn.c,v 1.2 2004/07/16 18:45:11 brandt Exp $
*
* ATM API as defined per af-saa-0108
*
@@ -139,7 +139,7 @@ cc_send_uni(struct ccconn *conn, u_int op, struct uni_msg *msg)
if (r == NULL) {
if (msg != NULL)
uni_msg_destroy(msg);
- cc_conn_log(conn, "no memory for cookie");
+ cc_conn_log(conn, "no memory for cookie op=%u", op);
return;
}
diff --git a/sys/contrib/ngatm/netnatm/api/cc_dump.c b/sys/contrib/ngatm/netnatm/api/cc_dump.c
index d3b0c58191332..245f8b7b5f04e 100644
--- a/sys/contrib/ngatm/netnatm/api/cc_dump.c
+++ b/sys/contrib/ngatm/netnatm/api/cc_dump.c
@@ -27,7 +27,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Begemot: libunimsg/netnatm/api/cc_dump.c,v 1.1 2004/07/08 08:21:51 brandt Exp $
+ * $Begemot: libunimsg/netnatm/api/cc_dump.c,v 1.3 2004/08/05 07:10:56 brandt Exp $
*
* ATM API as defined per af-saa-0108
*/
@@ -43,7 +43,7 @@
#ifdef _KERNEL
#ifdef __FreeBSD__
-#include <sys/stdarg.h>
+#include <machine/stdarg.h>
#endif
#else /* !_KERNEL */
#include <stdarg.h>
@@ -84,7 +84,7 @@ cc_dumpf(struct dump *d, const char *fmt, ...)
va_end(ap);
if (n < 0) {
- d->ret = errno;
+ d->ret = CCGETERRNO();
return;
}
if ((size_t)n < d->maxsiz - d->len) {
@@ -105,7 +105,7 @@ cc_dumpf(struct dump *d, const char *fmt, ...)
va_end(ap);
if (n < 0) {
- d->ret = errno;
+ d->ret = CCGETERRNO();
return;
}
if ((size_t)n >= d->maxsiz) {
@@ -123,18 +123,18 @@ static void
cc_dump_sap(struct dump *d, const struct uni_sap *sap)
{
static const char *const tagtab[] = {
- [UNISVE_ABSENT] "absent",
- [UNISVE_ANY] "any",
- [UNISVE_PRESENT]"present"
+ [UNISVE_ABSENT] = "absent",
+ [UNISVE_ANY] = "any",
+ [UNISVE_PRESENT] = "present"
};
static const char *const plantab[] = {
- [UNI_ADDR_E164] "E164",
- [UNI_ADDR_ATME] "ATME",
+ [UNI_ADDR_E164] = "E164",
+ [UNI_ADDR_ATME] = "ATME",
};
static const char *const hlitab[] = {
- [UNI_BHLI_ISO] "ISO",
- [UNI_BHLI_VENDOR] "VENDOR",
- [UNI_BHLI_USER] "USER"
+ [UNI_BHLI_ISO] = "ISO",
+ [UNI_BHLI_VENDOR] = "VENDOR",
+ [UNI_BHLI_USER] = "USER"
};
u_int i;
diff --git a/sys/contrib/ngatm/netnatm/api/cc_user.c b/sys/contrib/ngatm/netnatm/api/cc_user.c
index a4d5c76ffdd54..75ce91eb4e56e 100644
--- a/sys/contrib/ngatm/netnatm/api/cc_user.c
+++ b/sys/contrib/ngatm/netnatm/api/cc_user.c
@@ -31,7 +31,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Begemot: libunimsg/netnatm/api/cc_user.c,v 1.2 2004/07/08 09:17:18 brandt Exp $
+ * $Begemot: libunimsg/netnatm/api/cc_user.c,v 1.3 2004/07/16 18:46:55 brandt Exp $
*
* ATM API as defined per af-saa-0108
*
@@ -1297,6 +1297,7 @@ cc_user_sig_handle(struct ccuser *user, enum user_sig sig,
/* connection has disappeared. Send an ok
* to the user and lock whether there is another
* connection at this endpoint */
+ uni_msg_destroy(msg);
cc_user_ok(user, ATMRESP_NONE, NULL, 0);
set_state(user, USER_IN_WAITING);
@@ -1359,6 +1360,7 @@ cc_user_sig_handle(struct ccuser *user, enum user_sig sig,
/* connection has disappeared. Send an error
* to the user and lock whether there is another
* connection at this endpoint */
+ uni_msg_destroy(msg);
cc_user_err(user, ATMERR_PREVIOUSLY_ABORTED);
set_state(user, USER_IN_WAITING);
@@ -1370,15 +1372,14 @@ cc_user_sig_handle(struct ccuser *user, enum user_sig sig,
LIST_FOREACH(newep, &user->cc->user_list, node_link)
if (strcmp(acc->newep, newep->name) == 0)
break;
+ uni_msg_destroy(msg);
if (newep == NULL) {
- uni_msg_destroy(msg);
cc_user_err(user, ATMERR_BAD_ENDPOINT);
return;
}
if (newep->state != USER_NULL || newep->accepted != NULL) {
- uni_msg_destroy(msg);
cc_user_err(user, ATMERR_BAD_STATE);
return;
}