[Asterisk-Dev] ENODATA is not standard
Thorsten Lockert
tholo at sigmasoft.com
Wed Apr 23 10:01:58 MST 2003
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 @@
}
ast_unlock_contexts();
- errno = ENODATA;
+ errno = ENOENT;
return -1;
}
@@ -3188,7 +3188,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 @@
}
ast_unlock_contexts();
- errno = ENODATA;
+ errno = ENOENT;
return -1;
}
@@ -3266,7 +3266,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 @@
}
ast_unlock_contexts();
- errno = ENODATA;
+ errno = ENOENT;
return -1;
}
Index: pbx/pbx_config.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx/pbx_config.c,v
retrieving revision 1.3
diff -u -r1.3 pbx_config.c
--- pbx/pbx_config.c 6 Apr 2003 18:19:51 -0000 1.3
+++ pbx/pbx_config.c 23 Apr 2003 16:49:49 -0000
@@ -688,10 +689,10 @@
ast_cli(fd, "Context '%s' already included in '%s' context\n",
argv[1], argv[3]); break;
- 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;
--
Thorsten Lockert | tholo at sigmasoft.com | Universe, n.:
2121 N. Lakeshore Dr. | tholo at openbsd.org | The problem.
Chapel Hill, NC 27514 | |
More information about the asterisk-dev
mailing list