16 lines
		
	
	
		
			291 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			291 B
		
	
	
	
		
			C
		
	
	
	
	
	
| #include <easysock.h>
 | |
| 
 | |
| #include "message_helpers.h"
 | |
| 
 | |
| char* fetch_address(char* message) {
 | |
| 	char* token = malloc (sizeof(char) * strlen(message));
 | |
| 	token = strtok(message," \r\n");
 | |
| 	if (strcmp(token,"TO:") == 0) {
 | |
| 		token = strtok(NULL," \r\n");
 | |
| 	} else {
 | |
| 		return NULL;
 | |
| 	}
 | |
| 
 | |
| 	return token;
 | |
| }
 |