version 1.4, 2025/03/22 18:43:54
|
version 1.6, 2025/04/13 04:22:43
|
Line 24
|
Line 24
|
* along with FreeM. If not, see <https://www.gnu.org/licenses/>. |
* along with FreeM. If not, see <https://www.gnu.org/licenses/>. |
* |
* |
* $Log$ |
* $Log$ |
|
* Revision 1.6 2025/04/13 04:22:43 snw |
|
* Fix snprintf calls |
|
* |
|
* Revision 1.5 2025/03/24 04:13:11 snw |
|
* Replace action macro dat with fra_dat to avoid symbol conflict on OS/2 |
|
* |
* Revision 1.4 2025/03/22 18:43:54 snw |
* Revision 1.4 2025/03/22 18:43:54 snw |
* Make STRLEN 255 chars and add BIGSTR macro for larger buffers |
* Make STRLEN 255 chars and add BIGSTR macro for larger buffers |
* |
* |
Line 74 void ssvn_zprocess (short action, char *
|
Line 80 void ssvn_zprocess (short action, char *
|
} |
} |
|
|
t_pid = atol(ref->subscripts[0]); |
t_pid = atol(ref->subscripts[0]); |
snprintf (proc_path, PATHLEN, "/proc/%d", t_pid); |
snprintf (proc_path, PATHLEN - 1, "/proc/%d", t_pid); |
|
|
strncpy (verb, ref->subscripts[1], STRLEN); |
strncpy (verb, ref->subscripts[1], STRLEN); |
|
|
Line 88 void ssvn_zprocess (short action, char *
|
Line 94 void ssvn_zprocess (short action, char *
|
if (strcmp (verb, "EXISTS") == 0) { |
if (strcmp (verb, "EXISTS") == 0) { |
|
|
if (kill (t_pid, 0) == 0) { |
if (kill (t_pid, 0) == 0) { |
snprintf (data, STRLEN, "%d\201", 1); |
snprintf (data, STRLEN - 1, "%d\201", 1); |
} |
} |
else { |
else { |
snprintf (data, STRLEN, "%d\201", 0); |
snprintf (data, STRLEN - 1, "%d\201", 0); |
} |
} |
|
|
free (kbuf); |
free (kbuf); |
Line 112 void ssvn_zprocess (short action, char *
|
Line 118 void ssvn_zprocess (short action, char *
|
|
|
strncpy (attrib, ref->subscripts[2], 255); |
strncpy (attrib, ref->subscripts[2], 255); |
|
|
snprintf (fpath, PATHLEN, "/proc/%d/%s", t_pid, attrib); |
snprintf (fpath, PATHLEN - 1, "/proc/%d/%s", t_pid, attrib); |
|
|
if ((fp = fopen (fpath, "r")) == NULL) { |
if ((fp = fopen (fpath, "r")) == NULL) { |
|
|
Line 197 void ssvn_zprocess (short action, char *
|
Line 203 void ssvn_zprocess (short action, char *
|
merr_raise (OK); |
merr_raise (OK); |
return; |
return; |
|
|
case dat: |
case fra_dat: |
case fra_order: |
case fra_order: |
case fra_query: |
case fra_query: |
case bigquery: |
case bigquery: |