Posted: Wed Apr 23, 2003 5:01 pm Post subject: [Asterisk-Dev] ENODATA is not standard
This diff will change ENODATA to ENOENT -- ENODATA does not exist
on many systems, and is not standard
Index: pbx.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx.c,v
retrieving revision 1.15
diff -u -r1.15 pbx.c
--- pbx.c 21 Apr 2003 03:02:22 -0000 1.15
+++ pbx.c 23 Apr 2003 16:49:42 -0000
@@ -2684,7 +2684,7 @@
/*
* errno values
* EBUSY - can't lock
- * ENODATA - no existence of context
+ * ENOENT - no existence of context
*/
int ast_context_add_include(char *context, char *include, char *registrar)
{
@@ -2710,7 +2710,7 @@
/* we can't find the right context */
ast_unlock_contexts();
- errno = ENODATA;
+ errno = ENOENT;
return -1;
}
@@ -3035,7 +3035,7 @@
/*
* errno values
* EBUSY - can't lock
- * ENODATA - no existence of context
+ * ENOENT - no existence of context
*/
int ast_context_add_switch(char *context, char *sw, char *data, char *registrar)
{
@@ -3061,7 +3061,7 @@
/* we can't find the right context */
ast_unlock_contexts();
- errno = ENODATA;
+ errno = ENOENT;
return -1;
}
@@ -3129,7 +3129,7 @@
/*
* EBUSY - can't lock
- * ENODATA - there is not context existence
+ * ENOENT - there is not context existence
*/
int ast_context_remove_ignorepat(char *context, char *ignorepat, char *registrar)
{
@@ -3151,7 +3151,7 @@
}
/*
* EBUSY - can't lock
- * ENODATA - there is no existence of context
+ * ENOENT - there is no existence of context
*/
int ast_context_add_ignorepat(char *con, char *value, char *registrar)
{
@@ -3210,7 +3210,7 @@
}
/*
* EBUSY - can't lock
- * ENODATA - no existence of context
+ * ENOENT - no existence of context
*
*/
int ast_add_extension(char *context, int replace, char *extension, int priority, char *callerid,
@@ -3291,7 +3291,7 @@
}
- case ENODATA:
+ case ENOENT:
case EINVAL:
ast_cli(fd, "There is no existence of context '%s'\n",
- errno == ENODATA ? argv[3] : argv[1]); break;
+ errno == ENOENT ? argv[3] : argv[1]); break;
default:
ast_cli(fd, "Failed to include '%s' in '%s' context\n",
@@ -1114,7 +1115,7 @@
case EBUSY:
ast_cli(fd, "Failed to lock context(s) list, please try again later\n"); break;
- case ENODATA:
+ case ENOENT:
ast_cli(fd, "No existence of '%s' context\n", argv[4]); break;
case EEXIST:
@@ -1196,7 +1197,7 @@
case ENOMEM:
ast_cli(fd, "Out of free memory\n"); break;
- case ENODATA:
+ case ENOENT:
ast_cli(fd, "There is no existence of '%s' context\n", argv[4]);
break;
@@ -1293,7 +1294,7 @@
ast_cli(fd, "Failed to lock context(s) list, please try again later\n");
break;
- case ENODATA:
+ case ENOENT:
ast_cli(fd, "There is no existence of '%s' context\n", argv[4]);
break;
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum