Changeset 16337
- Timestamp:
- Feb 6, 2008, 10:30:49 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/sys/psLogMsg.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sys/psLogMsg.c
r15384 r16337 11 11 * @author GLG, MHPCC 12 12 * 13 * @version $Revision: 1.6 7$ $Name: not supported by cvs2svn $14 * @date $Date: 200 7-10-26 02:40:24$13 * @version $Revision: 1.68 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2008-02-06 20:30:49 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 197 197 // Destination is protocol:location 198 198 psList *protocolLocation = psStringSplit(dest, ":", false); // A list containing the protocol and location 199 if (protocolLocation->n != 2) { 199 const char *protocol, *location; // Protocol and location for message 200 if (protocolLocation->n == 1) { 201 // "file" is the default protocol --- use it if no protocol is specified. 202 protocol = "file"; 203 location = psListGet(protocolLocation, PS_LIST_TAIL); // The location 204 } else if (protocolLocation->n != 2) { 200 205 psFree(protocolLocation); 201 206 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Unable to parse protocol:location from: %s\n", dest); 202 207 return -1; 203 } 204 const char *protocol = psListGet(protocolLocation, PS_LIST_HEAD); // The protocol 205 const char *location = psListGet(protocolLocation, PS_LIST_TAIL); // The location 208 } else { 209 protocol = psListGet(protocolLocation, PS_LIST_HEAD); 210 location = psListGet(protocolLocation, PS_LIST_TAIL); 211 } 206 212 207 213 if (strcasecmp(protocol, "file") == 0) { 208 // FILE *file = fopen(location, "w");209 214 int fileD = creat(location, 0666); 210 215
Note:
See TracChangeset
for help on using the changeset viewer.
