void W3_Set_Method(struct W3* w3, const char* method) {
if(w3->method != NULL) free(w3->method);
- if(method == NULL){
+ if(method == NULL) {
w3->method = NULL;
- }else{
+ } else {
w3->method = __W3_Strdup(method);
}
}
void W3_Set_Path(struct W3* w3, const char* path) {
if(w3->path != NULL) free(w3->path);
- if(path == NULL){
+ if(path == NULL) {
w3->path = NULL;
- }else{
+ } else {
w3->path = __W3_Strdup(path);
}
}
void W3_POP3_Send_Request(struct W3* w3) {
if(strcasecmp(w3->method, "LIST") == 0) {
__W3_Auto_Write(w3, "LIST ", 5);
- if(w3->path != NULL && strlen(w3->path) != 0){
+ if(w3->path != NULL && strlen(w3->path) != 0) {
__W3_Auto_Write(w3, w3->path, strlen(w3->path));
- }else{
+ } else {
*((bool*)w3->generic) = false;
}
__W3_Auto_Write(w3, "\r\n", 2);
- }else if(strcasecmp(w3->method, "RETR") == 0) {
+ } else if(strcasecmp(w3->method, "RETR") == 0) {
__W3_Auto_Write(w3, "RETR ", 5);
- if(w3->path != NULL && strlen(w3->path) != 0){
+ if(w3->path != NULL && strlen(w3->path) != 0) {
__W3_Auto_Write(w3, w3->path, strlen(w3->path));
*((bool*)w3->generic) = false;
}